<%= form_for(@relationship, url: post_relationships_path(@post), html: { multipart: true } ) do |f| %>
    <%= render 'shared/error_messages', object: f.object %>
    <div class="field">
      <%= hidden_field :relationship, :comment_id, value: @current_user.id  %>
      <%= f.text_area :comment, placeholder: "评论" %>
    </div>
    <%= f.submit "评论", class: "btn btn-primary" %>
<% end %>

<!--
<script type="text/javascript">
    $('#micropost_picture').bind('change', function() {
        var size_in_megabytes = this.files[0].size/1024/1024;
        if (size_in_megabytes > 5) {
            alert('Maximum file size is 5MB. Please choose a smaller file.');
        }
    });
</script>-->
